[IA64] Cleanup: remove cpu_user_regs from arch-ia64.h
authorAlex Williamson <alex.williamson@hp.com>
Mon, 2 Jul 2007 15:54:53 +0000 (09:54 -0600)
committerAlex Williamson <alex.williamson@hp.com>
Mon, 2 Jul 2007 15:54:53 +0000 (09:54 -0600)
Add a constant for isr.ni

Signed-off-by: Tristan Gingold <tgingold@free.fr>
xen/arch/ia64/vmx/vmx_minstate.h
xen/arch/ia64/xen/domain.c
xen/include/asm-ia64/linux-xen/asm/ptrace.h
xen/include/asm-ia64/vcpu.h
xen/include/asm-ia64/xenkregs.h
xen/include/public/arch-ia64.h
xen/include/public/foreign/reference.size

index 02a60ec07aa31f7772e90363fd5ad639e31d755b..e5b090087ae4525df300c41cd20122ceedb38e66 100644 (file)
     ;;                                          \
     tbit.z p6,p0=r29,IA64_PSR_VM_BIT;       \
     ;;      \
-    tbit.nz.or p6,p0 = r18,39; \
+    tbit.nz.or p6,p0 = r18,IA64_ISR_NI_BIT; \
     ;;        \
-(p6) br.sptk.few vmx_panic;        \
+(p6) br.spnt.few vmx_panic;        \
     tbit.z p0,p15=r29,IA64_PSR_I_BIT;   \
     mov r1=r16;                     \
 /*    mov r21=r16;     */              \
index 0844bbb97dc387741a5811d1b2f6081f34180bb2..7ee5db777b8d229c00c6b6693307f09c4348bc7c 100644 (file)
@@ -612,6 +612,8 @@ int arch_vcpu_reset(struct vcpu *v)
        return 0;
 }
 
+#define COPY_FPREG(dst, src) memcpy(dst, src, sizeof(struct ia64_fpreg))
+
 void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c)
 {
        int i;
@@ -678,12 +680,12 @@ void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c)
 
        c.nat->regs.ar.ccv = uregs->ar_ccv;
 
-       c.nat->regs.f[6] = uregs->f6;
-       c.nat->regs.f[7] = uregs->f7;
-       c.nat->regs.f[8] = uregs->f8;
-       c.nat->regs.f[9] = uregs->f9;
-       c.nat->regs.f[10] = uregs->f10;
-       c.nat->regs.f[11] = uregs->f11;
+       COPY_FPREG(&c.nat->regs.f[6], &uregs->f6);
+       COPY_FPREG(&c.nat->regs.f[7], &uregs->f7);
+       COPY_FPREG(&c.nat->regs.f[8], &uregs->f8);
+       COPY_FPREG(&c.nat->regs.f[9], &uregs->f9);
+       COPY_FPREG(&c.nat->regs.f[10], &uregs->f10);
+       COPY_FPREG(&c.nat->regs.f[11], &uregs->f11);
 
        c.nat->regs.r[4] = uregs->r4;
        c.nat->regs.r[5] = uregs->r5;
@@ -820,12 +822,12 @@ int arch_set_info_guest(struct vcpu *v, vcpu_guest_context_u c)
        
        uregs->ar_ccv = c.nat->regs.ar.ccv;
        
-       uregs->f6 = c.nat->regs.f[6];
-       uregs->f7 = c.nat->regs.f[7];
-       uregs->f8 = c.nat->regs.f[8];
-       uregs->f9 = c.nat->regs.f[9];
-       uregs->f10 = c.nat->regs.f[10];
-       uregs->f11 = c.nat->regs.f[11];
+       COPY_FPREG(&uregs->f6, &c.nat->regs.f[6]);
+       COPY_FPREG(&uregs->f7, &c.nat->regs.f[7]);
+       COPY_FPREG(&uregs->f8, &c.nat->regs.f[8]);
+       COPY_FPREG(&uregs->f9, &c.nat->regs.f[9]);
+       COPY_FPREG(&uregs->f10, &c.nat->regs.f[10]);
+       COPY_FPREG(&uregs->f11, &c.nat->regs.f[11]);
        
        uregs->r4 = c.nat->regs.r[4];
        uregs->r5 = c.nat->regs.r[5];
index 8bcdf96442ffd1b0a89b15fe32193b82e0bbd0f4..5ee536e56bf95d17ddda4b42c67a68ec4df5cd21 100644 (file)
 #ifdef XEN
 #include <xen/types.h>
 #include <public/xen.h>
-#define pt_regs cpu_user_regs
-
-/*  User regs at placed at the end of the vcpu area.
-    Convert a vcpu pointer to a regs pointer.
-    Note: this is the same as ia64_task_regs, but it uses a Xen-friendly name.
-*/
-struct vcpu;
-static inline struct cpu_user_regs *
-vcpu_regs (struct vcpu *v)
-{
-  return (struct cpu_user_regs *) ((unsigned long) v + IA64_STK_OFFSET) - 1;
-}
 
-struct pt_regs *guest_cpu_user_regs(void);
+#define pt_regs cpu_user_regs
+#endif
 
-#else
 struct pt_regs {
        /* The following registers are saved by SAVE_MIN: */
        unsigned long b6;               /* scratch */
@@ -188,7 +176,29 @@ struct pt_regs {
        struct ia64_fpreg f9;           /* scratch */
        struct ia64_fpreg f10;          /* scratch */
        struct ia64_fpreg f11;          /* scratch */
+#ifdef XEN
+       unsigned long r4;               /* preserved */
+       unsigned long r5;               /* preserved */
+       unsigned long r6;               /* preserved */
+       unsigned long r7;               /* preserved */
+       unsigned long eml_unat;         /* used for emulating instruction */
+       unsigned long pad0;             /* alignment pad */
+#endif
 };
+
+#ifdef XEN
+/*
+ * User regs are placed at the end of the vcpu area.
+ * Convert a vcpu pointer to a regs pointer.
+ * Note: this is the same as ia64_task_regs, but it uses a Xen-friendly name.
+ */
+struct vcpu;
+static inline struct cpu_user_regs *vcpu_regs(struct vcpu *v)
+{
+       return (struct cpu_user_regs *)((unsigned long)v + IA64_STK_OFFSET) - 1;
+}
+
+struct cpu_user_regs *guest_cpu_user_regs(void);
 #endif
 
 /*
index 2e3f6bd9792774378d858c8fef021b34c6335e20..b01f9bcce2485e6af3760c61aae742c8be37af1f 100644 (file)
@@ -13,7 +13,8 @@
 #include <linux/acpi.h>
 struct vcpu;
 typedef struct vcpu VCPU;
-typedef cpu_user_regs_t REGS;
+typedef struct cpu_user_regs REGS;
+
 extern u64 cycle_to_ns(u64 cycle);
 
 /* Note: PSCB stands for Privilegied State Communication Block.  */
index 4050bb700f51acb284d64920b7dcac28a965e784..a018fb55102a4ea54394f70fa419764fe9b5b202 100644 (file)
@@ -21,6 +21,9 @@
 #define IA64_IFS_V_BIT         63
 #define IA64_IFS_V     (__IA64_UL(1) << IA64_IFS_V_BIT)
 
+/* Interruption Status Register.  */
+#define IA64_ISR_NI_BIT        39      /* Nested interrupt.  */
+
 /* Page Table Address */
 #define IA64_PTA_VE_BIT 0
 #define IA64_PTA_SIZE_BIT 2
index e98e850dd63766da3e17964f589965f7714e2330..43c56b4c3de2d6aed43dd929ce02808e83f55b97 100644 (file)
@@ -130,83 +130,6 @@ struct pt_fpreg {
     } u;
 };
 
-struct cpu_user_regs {
-    /* The following registers are saved by SAVE_MIN: */
-    unsigned long b6;  /* scratch */
-    unsigned long b7;  /* scratch */
-
-    unsigned long ar_csd; /* used by cmp8xchg16 (scratch) */
-    unsigned long ar_ssd; /* reserved for future use (scratch) */
-
-    unsigned long r8;  /* scratch (return value register 0) */
-    unsigned long r9;  /* scratch (return value register 1) */
-    unsigned long r10; /* scratch (return value register 2) */
-    unsigned long r11; /* scratch (return value register 3) */
-
-    unsigned long cr_ipsr; /* interrupted task's psr */
-    unsigned long cr_iip;  /* interrupted task's instruction pointer */
-    unsigned long cr_ifs;  /* interrupted task's function state */
-
-    unsigned long ar_unat; /* interrupted task's NaT register (preserved) */
-    unsigned long ar_pfs;  /* prev function state  */
-    unsigned long ar_rsc;  /* RSE configuration */
-    /* The following two are valid only if cr_ipsr.cpl > 0: */
-    unsigned long ar_rnat;  /* RSE NaT */
-    unsigned long ar_bspstore; /* RSE bspstore */
-
-    unsigned long pr;  /* 64 predicate registers (1 bit each) */
-    unsigned long b0;  /* return pointer (bp) */
-    unsigned long loadrs;  /* size of dirty partition << 16 */
-
-    unsigned long r1;  /* the gp pointer */
-    unsigned long r12; /* interrupted task's memory stack pointer */
-    unsigned long r13; /* thread pointer */
-
-    unsigned long ar_fpsr;  /* floating point status (preserved) */
-    unsigned long r15;  /* scratch */
-
- /* The remaining registers are NOT saved for system calls.  */
-
-    unsigned long r14;  /* scratch */
-    unsigned long r2;  /* scratch */
-    unsigned long r3;  /* scratch */
-    unsigned long r16;  /* scratch */
-    unsigned long r17;  /* scratch */
-    unsigned long r18;  /* scratch */
-    unsigned long r19;  /* scratch */
-    unsigned long r20;  /* scratch */
-    unsigned long r21;  /* scratch */
-    unsigned long r22;  /* scratch */
-    unsigned long r23;  /* scratch */
-    unsigned long r24;  /* scratch */
-    unsigned long r25;  /* scratch */
-    unsigned long r26;  /* scratch */
-    unsigned long r27;  /* scratch */
-    unsigned long r28;  /* scratch */
-    unsigned long r29;  /* scratch */
-    unsigned long r30;  /* scratch */
-    unsigned long r31;  /* scratch */
-    unsigned long ar_ccv;  /* compare/exchange value (scratch) */
-
-    /*
-     * Floating point registers that the kernel considers scratch:
-     */
-    struct pt_fpreg f6;  /* scratch */
-    struct pt_fpreg f7;  /* scratch */
-    struct pt_fpreg f8;  /* scratch */
-    struct pt_fpreg f9;  /* scratch */
-    struct pt_fpreg f10;  /* scratch */
-    struct pt_fpreg f11;  /* scratch */
-    unsigned long r4;  /* preserved */
-    unsigned long r5;  /* preserved */
-    unsigned long r6;  /* preserved */
-    unsigned long r7;  /* preserved */
-    unsigned long eml_unat;    /* used for emulating instruction */
-    unsigned long pad0;     /* alignment pad */
-
-};
-typedef struct cpu_user_regs cpu_user_regs_t;
-
 union vac {
     unsigned long value;
     struct {
index d2c42d74f9fcc1191aeacf8fe2da72fdb4d3d77e..853e8194ace00e8e308afb7b5aaa67b77c74780b 100644 (file)
@@ -4,7 +4,7 @@ structs                   |  x86_32  x86_64    ia64
 start_info                |    1104    1152    1152
 trap_info                 |       8      16       -
 pt_fpreg                  |       -       -      16
-cpu_user_regs             |      68     200     496
+cpu_user_regs             |      68     200       -
 xen_ia64_boot_param       |       -       -      96
 ia64_tr_entry             |       -       -      32
 vcpu_tr_regs              |       -       -     512